package com.study.design.builder.bike;

import com.study.design.builder.bike.bus.AlloyFrame;
import com.study.design.builder.bike.bus.DermisSeat;
import com.study.design.builder.bike.bus.SolidTire;

/**
 * @Author 网易云课堂微专业-java高级开发工程师【allen老师】
 * @Version 1.0
 */
// 具体 builder 类
public class MobikeBuilder extends Builder{
    private Bike mBike = new Bike();
    @Override
    void buildFrame() {
        mBike.setFrame(new AlloyFrame());   // 合金框架
    }
    @Override
    void buildSeat() {
        mBike.setSeat(new DermisSeat());    // 真皮座椅
    }
    @Override
    void buildTire() {
        mBike.setTire(new SolidTire()); // 实心轮胎
    }
    @Override
    Bike createBike() {
        return mBike;
    }
}
